from likeshop_project.base.mybase import Tools

class login_model(Tools):
    # 定义路径
    path = '/api/account/login'

    def login_action(self,account,password,client=2):
        mydata ={
            'account': account,
            'password': password,
            'client': client
        }
        res = self.huihua.post(url=self.hosturl+self.path,data=mydata)
        return res.json()
if __name__ == '__main__':
    import requests
    s = requests.session()
    re = login_model(huihua=s)
    mag = re.login_action(account='17909898989',password='123wqewqrf')
    print(mag)
    a = mag['data'].get('token')
    print(a)

